x=[0.4,1.0,2.0,4.0,10]
y=[0.4053,1.0071,2.0167,3.9963,10.0165]
z=[1,1,1,1,1]

x_in=float(input())

def phiCal(lst1,lst2):
    sum=0
    for i,j in zip(lst1,lst2):
        sum+=i*j
    return sum

A=phiCal(z,z)
B=phiCal(z,x)
C=phiCal(x,x)
D=phiCal(z,y)
E=phiCal(x,y)

a0=(C*D-E*B)/(C*A-B*B)
a1=(D*B-E*A)/(B*B-A*C)

print("%.2f"%(a0+a1*x_in))

import matplotlib.pyplot as plt
plt.plot(x,y)
plt.show()